#include <iostream>
#include <vector>
#include <unordered_map>

using namespace std;

class Solution 
{
public:
    int minNumberDisappeared(vector<int>& nums) 
    {
        int n = nums.size();
        unordered_map<int, int> ump;
        for (auto e : nums)
        {
            ump[e]++;
        }
        int res = 1;
        while (ump.find(res) != ump.end())
            res++;

        return res;
    }
};


int main()
{
    vector<int> v1{ -2,3,4,1,5 };
    Solution xz;
    int n = xz.minNumberDisappeared(v1);

    cout << n << endl;

	return 0;
}

